package com.ctshk.common.enums.hotel;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 谢诗宏
 * @description 酒店下单人类型
 * @date 2021/3/11
 */
@AllArgsConstructor
public enum HotelOrdersType {

    // 酒店所有星级
    TRAVELER(1, "散客"),
    AGENT(2, "代理商"),
    BIG_CLIENT(3, "大客户");

    @Getter
    @Setter
    private int code;

    @Getter
    @Setter
    private String value;

    public static String parseValue(int code){
        for (HotelOrdersType type : HotelOrdersType.values()) {
            if (type.code == code) {
                return type.getValue();
            }
        }
        return null;
    }
}
